Update dependencies and Rust version
authorAlex Crichton <alex@alexcrichton.com>
Wed, 20 Jan 2016 17:07:47 +0000 (09:07 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 25 Jan 2016 17:33:51 +0000 (09:33 -0800)
Just a routine for niche bug fixes, linkage errors, perf improvements, etc.

44 files changed:
Cargo.lock
Cargo.toml
src/bin/bench.rs
src/bin/build.rs
src/bin/cargo.rs
src/bin/clean.rs
src/bin/doc.rs
src/bin/fetch.rs
src/bin/generate_lockfile.rs
src/bin/git_checkout.rs
src/bin/help.rs
src/bin/install.rs
src/bin/locate_project.rs
src/bin/login.rs
src/bin/new.rs
src/bin/owner.rs
src/bin/package.rs
src/bin/pkgid.rs
src/bin/publish.rs
src/bin/read_manifest.rs
src/bin/run.rs
src/bin/rustc.rs
src/bin/rustdoc.rs
src/bin/search.rs
src/bin/test.rs
src/bin/uninstall.rs
src/bin/update.rs
src/bin/verify_project.rs
src/bin/version.rs
src/bin/yank.rs
src/cargo/core/shell.rs
src/cargo/ops/cargo_package.rs
src/cargo/util/errors.rs
tests/support/registry.rs
tests/test_cargo_compile.rs
tests/test_cargo_compile_custom_build.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_compile_path_deps.rs
tests/test_cargo_freshness.rs
tests/test_cargo_package.rs
tests/test_cargo_publish.rs
tests/test_cargo_test.rs
tests/test_shell.rs
tests/tests.rs

index 2e464a5ee3b294983bfabfbfaf064e0f9fefcd07..aab8edce02df2b44c6a8f831a207d41f00cb52b2 100644 (file)
@@ -5,27 +5,27 @@ dependencies = [
  "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "bufstream 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "crates-io 0.1.0",
- "crossbeam 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "curl 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "docopt 0.6.78 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "flate2 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "git2-curl 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "hamcrest 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.48 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "semver 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "tar 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tar 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -71,36 +71,36 @@ dependencies = [
 name = "crates-io"
 version = "0.1.0"
 dependencies = [
- "curl 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "crossbeam"
-version = "0.1.6"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "curl"
-version = "0.2.14"
+version = "0.2.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "curl-sys 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "curl-sys"
-version = "0.1.29"
+version = "0.1.32"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -109,7 +109,7 @@ name = "docopt"
 version = "0.6.78"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "regex 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.48 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "strsim 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -119,26 +119,26 @@ name = "env_logger"
 version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.48 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "filetime"
-version = "0.1.8"
+version = "0.1.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "flate2"
-version = "0.2.11"
+version = "0.2.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -161,12 +161,12 @@ dependencies = [
 
 [[package]]
 name = "git2"
-version = "0.3.3"
+version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -175,9 +175,9 @@ name = "git2-curl"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "curl 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 0.2.38 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -191,16 +191,7 @@ name = "hamcrest"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "num 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "kernel32-sys"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -214,19 +205,19 @@ dependencies = [
 
 [[package]]
 name = "libc"
-version = "0.2.4"
+version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "libgit2-sys"
-version = "0.3.8"
+version = "0.3.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cmake 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libssh2-sys 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -244,9 +235,9 @@ version = "0.1.34"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cmake 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -258,16 +249,16 @@ version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "log"
-version = "0.3.4"
+version = "0.3.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -280,7 +271,7 @@ name = "memchr"
 version = "0.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -289,12 +280,17 @@ version = "0.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "nom"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
 [[package]]
 name = "num"
-version = "0.1.29"
+version = "0.1.30"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "rand 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -307,17 +303,17 @@ version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "openssl-sys"
-version = "0.7.4"
+version = "0.7.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libressl-pnacl-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -342,13 +338,13 @@ version = "0.3.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex"
-version = "0.1.44"
+version = "0.1.48"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "aho-corasick 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -368,8 +364,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "semver"
-version = "0.2.0"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "nom 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
 name = "strsim"
@@ -378,11 +377,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "tar"
-version = "0.3.2"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "filetime 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "filetime 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -396,7 +395,7 @@ dependencies = [
 
 [[package]]
 name = "term"
-version = "0.2.14"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -409,7 +408,7 @@ version = "0.1.34"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
index 7ff0500ff1f9ba9e5e2dbe6c798734c360da8d8b..1ae1a7cf759e12da5828219a35c3d9ede5d3253d 100644 (file)
@@ -19,7 +19,7 @@ path = "src/cargo/lib.rs"
 [dependencies]
 advapi32-sys = "0.1"
 crates-io = { path = "src/crates-io", version = "0.1" }
-crossbeam = "0.1"
+crossbeam = "0.2"
 curl = "0.2"
 docopt = "0.6"
 env_logger = "0.3"
@@ -28,7 +28,7 @@ flate2 = "0.2"
 git2 = "0.3"
 git2-curl = "0.3"
 glob = "0.2"
-kernel32-sys = "0.1"
+kernel32-sys = "0.2"
 libc = "0.2"
 libgit2-sys = "0.3"
 log = "0.3"
@@ -36,8 +36,8 @@ num_cpus = "0.2"
 regex = "0.1"
 rustc-serialize = "0.3"
 semver = "0.2.0"
-tar = "0.3"
-term = "0.2"
+tar = "0.4"
+term = "0.4"
 time = "0.1"
 toml = "0.1"
 url = "0.2"
index 691f4e33a2e5ff09f3de98edc94aadcd52c4063b..96203de1ad71e928a8dc4fee189f65f1408b90cb 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, CliError, Human, Config};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_no_run: bool,
     flag_package: Vec<String>,
     flag_jobs: Option<u32>,
index 428eac4c493508b13df1d514e6d41ff1ccfcfe11..be550f47569ec9027ebb5143433229a858b50a78 100644 (file)
@@ -6,7 +6,7 @@ use cargo::util::important_paths::{find_root_manifest_for_wd};
 use cargo::util::{CliResult, Config};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_package: Vec<String>,
     flag_jobs: Option<u32>,
     flag_features: Vec<String>,
index 72db84d251d7296becbb8007330cb2eb1f094634..9eb719a5c7036314f94b83901a3a7641d1504b8d 100644 (file)
@@ -14,7 +14,7 @@ use cargo::execute_main_without_stdin;
 use cargo::util::{self, CliResult, lev_distance, Config, human, CargoResult};
 
 #[derive(RustcDecodable)]
-struct Flags {
+pub struct Flags {
     flag_list: bool,
     flag_verbose: bool,
     flag_quiet: bool,
index e4345f843dc448cb1f98c8d3ca0be95acea0efbc..fa3ef0e50aeec70009cc560095762c507b46301c 100644 (file)
@@ -5,7 +5,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_package: Vec<String>,
     flag_target: Option<String>,
     flag_manifest_path: Option<String>,
index 651b8c39fc7ece0b55adc7d2c8336ecd0adbe0d9..4907575f27648a482eed60c09c1fc227c9fb2e3d 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_target: Option<String>,
     flag_features: Vec<String>,
     flag_jobs: Option<u32>,
index 96d2d9541f3249dadf8cab388ab47c8bba295c9c..cd17ef9b5b534ed8dc3144edb592714b5b40673c 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::find_root_manifest_for_wd;
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_manifest_path: Option<String>,
     flag_verbose: bool,
     flag_quiet: bool,
index 5bf4950a15082cf2c3e6cbb4659726692aea66bf..197a2319aca8f4f3a8aa60e76fdddb1a89bc01d5 100644 (file)
@@ -5,7 +5,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::find_root_manifest_for_wd;
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_manifest_path: Option<String>,
     flag_verbose: bool,
     flag_quiet: bool,
index 82daf45876cf6e7d4690e4065e2a2299f4a49546..1aa13bc6e412b5c5f1d6e1b2041c57d244bbf7b8 100644 (file)
@@ -3,7 +3,7 @@ use cargo::sources::git::{GitSource};
 use cargo::util::{Config, CliResult, CliError, human, ToUrl};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_url: String,
     flag_reference: String,
     flag_verbose: bool,
index f07a1cc669a1fe065bc777395c8cdb75148124aa..8f104fcbcf2f59a86707dbdb958e5ee637183e69 100644 (file)
@@ -1,7 +1,7 @@
 use cargo::util::{CliResult, CliError, Config};
 
 #[derive(RustcDecodable)]
-struct Options;
+pub struct Options;
 
 pub const USAGE: &'static str = "
 Get some help with a cargo command.
index 141956179f26f0e596a9794b46606f18138c7c74..02a8124333c0242a4623af3f529f13009c512ad5 100644 (file)
@@ -3,7 +3,7 @@ use cargo::core::{SourceId, GitReference};
 use cargo::util::{CliResult, Config, ToUrl, human};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_jobs: Option<u32>,
     flag_features: Vec<String>,
     flag_no_default_features: bool,
index 005e60b5a33c07bbf34b13a7aa102bea40512547..b6c7aa075eeccc0c6ca308eac334f5d9e9fd9131 100644 (file)
@@ -2,7 +2,7 @@ use cargo::util::{CliResult, CliError, human, ChainError, Config};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct LocateProjectFlags {
+pub struct LocateProjectFlags {
     flag_manifest_path: Option<String>,
 }
 
@@ -18,7 +18,7 @@ Options:
 ";
 
 #[derive(RustcEncodable)]
-struct ProjectLocation {
+pub struct ProjectLocation {
     root: String
 }
 
index 2f60631d60f46f39a84260784d0e591b270f4745..70ef64d8e7953229b0c2106b01948bb3eb6edb54 100644 (file)
@@ -7,7 +7,7 @@ use cargo::sources::RegistrySource;
 use cargo::util::{CliResult, Config, human, ChainError};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_host: Option<String>,
     arg_token: Option<String>,
     flag_verbose: bool,
index 5b0554af92787c52b6e7da2e093475cbca622dcd..ba392132277fc1ac19bea072c4499a7fd3498c9d 100644 (file)
@@ -4,7 +4,7 @@ use cargo::ops;
 use cargo::util::{CliResult, Config};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_verbose: bool,
     flag_quiet: bool,
     flag_color: Option<String>,
index b40fc3f692ba621beda8a53b5d10f6d3e0f1d5fd..40d4e20b9ff4023fffdb5a378135824aa06f8a34 100644 (file)
@@ -2,7 +2,7 @@ use cargo::ops;
 use cargo::util::{CliResult, Config};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     arg_crate: Option<String>,
     flag_token: Option<String>,
     flag_add: Option<Vec<String>>,
index f5f89c35f259d4e4c0462cd207923ef6ae33cfa4..c9bb161ef5150909ea64b57ccd966f3060bca9d8 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::find_root_manifest_for_wd;
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_verbose: bool,
     flag_quiet: bool,
     flag_color: Option<String>,
index 6446e1587045b95e82b7b36fe3148580c6fa9924..7a88b290589200ab8a51c0838b945bbc81e1cdc4 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_verbose: bool,
     flag_quiet: bool,
     flag_color: Option<String>,
index 246057cab7edc1141224f2859788a41de687ddea..cf8f8f9040ed3ae76b3de1d644c7b139398e4f76 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::find_root_manifest_for_wd;
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_host: Option<String>,
     flag_token: Option<String>,
     flag_manifest_path: Option<String>,
index 9e8d81e4b72b346a961910ec2f2f7fc962f877fe..141ebfff9aa82e96eab071270b5bea671596883c 100644 (file)
@@ -6,7 +6,7 @@ use cargo::util::important_paths::{find_root_manifest_for_wd};
 use cargo::sources::{PathSource};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_manifest_path: Option<String>,
     flag_color: Option<String>,
 }
index ddee42ccf273be759768851cccd1d6229f1c03ba..1926bbf21bd8c0bd4a5e754c908f222106730250 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, CliError, Config, Human};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_bin: Option<String>,
     flag_example: Option<String>,
     flag_jobs: Option<u32>,
index 391e5f41f5fda53471869d020598c36fe8c974dd..3337ffcff4e87d78b120fa1cbd60b270286ab3a7 100644 (file)
@@ -6,7 +6,7 @@ use cargo::util::important_paths::{find_root_manifest_for_wd};
 use cargo::util::{CliResult, CliError, Config};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     arg_opts: Option<Vec<String>>,
     flag_package: Option<String>,
     flag_jobs: Option<u32>,
index 01a8307c47fb08effe12d9642bf26a98ea15ed61..9949c24c1e95e584b91db4e4c2a9d20d7f51c768 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     arg_opts: Vec<String>,
     flag_target: Option<String>,
     flag_features: Vec<String>,
index 93133a8dcb18fe8a0d5964dde5e1b26647c3daf1..e40d193c2419cfc525cda2df6ea4d1994b9cf981 100644 (file)
@@ -2,7 +2,7 @@ use cargo::ops;
 use cargo::util::{CliResult, Config};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_host: Option<String>,
     flag_verbose: bool,
     flag_quiet: bool,
index b919b52a563cbca1b972f3f353dcbf53d9797b2e..08b13df7686121999b475298294e031664280ce1 100644 (file)
@@ -3,7 +3,7 @@ use cargo::util::{CliResult, CliError, Human, Config};
 use cargo::util::important_paths::{find_root_manifest_for_wd};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     arg_args: Vec<String>,
     flag_features: Vec<String>,
     flag_jobs: Option<u32>,
index e78bf605f38fb997aee728439fe7ae9063cf7dc6..5b4b345dd0ca4208b629e5c38260ac0d8d14f33f 100644 (file)
@@ -2,7 +2,7 @@ use cargo::ops;
 use cargo::util::{CliResult, Config};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_bin: Vec<String>,
     flag_root: Option<String>,
     flag_verbose: bool,
index 00866a2a80eae4c11f297f5cc056a616e6c3d9b8..1a718125aafd4b5f4ae21cb21a21fe20db6a4885 100644 (file)
@@ -5,7 +5,7 @@ use cargo::util::{CliResult, Config};
 use cargo::util::important_paths::find_root_manifest_for_wd;
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     flag_package: Vec<String>,
     flag_aggressive: bool,
     flag_precise: Option<String>,
index 5cbd027f3d671c6718deb861ffdf267a80b82c6c..721b6eb7de594987f5519f6670d6f6d3fea8c045 100644 (file)
@@ -11,7 +11,7 @@ use toml;
 pub type Error = HashMap<String, String>;
 
 #[derive(RustcDecodable)]
-struct Flags {
+pub struct Flags {
     flag_manifest_path: Option<String>,
     flag_verbose: bool,
     flag_quiet: bool,
index 87402f7ccbca2378bd0bc7055c777c67a8fa496f..24ef5aea3cbc819d91dd39e33b2d5d8c957b5386 100644 (file)
@@ -4,7 +4,7 @@ use cargo;
 use cargo::util::{CliResult, Config};
 
 #[derive(RustcDecodable)]
-struct Options;
+pub struct Options;
 
 pub const USAGE: &'static str = "
 Show version information
index f9812154b92bffbb9166837c822f801d7210e45b..feb2c73ccb2900b72c20265bdc4e055a169e8666 100644 (file)
@@ -2,7 +2,7 @@ use cargo::ops;
 use cargo::util::{CliResult, Config};
 
 #[derive(RustcDecodable)]
-struct Options {
+pub struct Options {
     arg_crate: Option<String>,
     flag_token: Option<String>,
     flag_vers: Option<String>,
index 5a50a98860fbff826a11ce92455f170cc630a70a..14cc5f38794d44b6e83dfdc078224ebc8e835723 100644 (file)
@@ -2,9 +2,8 @@ use std::fmt;
 use std::io::prelude::*;
 use std::io;
 
-use term::Attr;
 use term::color::{Color, BLACK, RED, GREEN, YELLOW};
-use term::{Terminal, TerminfoTerminal, color};
+use term::{self, Terminal, TerminfoTerminal, color, Attr};
 
 use self::AdequateTerminal::{NoColor, Colored};
 use self::Verbosity::{Verbose, Normal, Quiet};
@@ -61,14 +60,15 @@ impl MultiShell {
         &mut self.err
     }
 
-    pub fn say<T: ToString>(&mut self, message: T, color: Color) -> io::Result<()> {
+    pub fn say<T: ToString>(&mut self, message: T, color: Color)
+                            -> CargoResult<()> {
         match self.verbosity {
             Quiet => Ok(()),
             _ => self.out().say(message, color)
         }
     }
 
-    pub fn status<T, U>(&mut self, status: T, message: U) -> io::Result<()>
+    pub fn status<T, U>(&mut self, status: T, message: U) -> CargoResult<()>
         where T: fmt::Display, U: fmt::Display
     {
         match self.verbosity {
@@ -77,8 +77,8 @@ impl MultiShell {
         }
     }
 
-    pub fn verbose<F>(&mut self, mut callback: F) -> io::Result<()>
-        where F: FnMut(&mut MultiShell) -> io::Result<()>
+    pub fn verbose<F>(&mut self, mut callback: F) -> CargoResult<()>
+        where F: FnMut(&mut MultiShell) -> CargoResult<()>
     {
         match self.verbosity {
             Verbose => callback(self),
@@ -86,8 +86,8 @@ impl MultiShell {
         }
     }
 
-    pub fn concise<F>(&mut self, mut callback: F) -> io::Result<()>
-        where F: FnMut(&mut MultiShell) -> io::Result<()>
+    pub fn concise<F>(&mut self, mut callback: F) -> CargoResult<()>
+        where F: FnMut(&mut MultiShell) -> CargoResult<()>
     {
         match self.verbosity {
             Verbose => Ok(()),
@@ -95,11 +95,11 @@ impl MultiShell {
         }
     }
 
-    pub fn error<T: ToString>(&mut self, message: T) -> io::Result<()> {
+    pub fn error<T: ToString>(&mut self, message: T) -> CargoResult<()> {
         self.err().say(message, RED)
     }
 
-    pub fn warn<T: ToString>(&mut self, message: T) -> io::Result<()> {
+    pub fn warn<T: ToString>(&mut self, message: T) -> CargoResult<()> {
         self.err().say(message, YELLOW)
     }
 
@@ -170,7 +170,7 @@ impl Shell {
         self.config.color_config = color_config;
     }
 
-    pub fn say<T: ToString>(&mut self, message: T, color: Color) -> io::Result<()> {
+    pub fn say<T: ToString>(&mut self, message: T, color: Color) -> CargoResult<()> {
         try!(self.reset());
         if color != BLACK { try!(self.fg(color)); }
         try!(write!(self, "{}\n", message.to_string()));
@@ -180,7 +180,7 @@ impl Shell {
     }
 
     pub fn say_status<T, U>(&mut self, status: T, message: U, color: Color)
-                            -> io::Result<()>
+                            -> CargoResult<()>
         where T: fmt::Display, U: fmt::Display
     {
         try!(self.reset());
@@ -193,22 +193,24 @@ impl Shell {
         Ok(())
     }
 
-    fn fg(&mut self, color: color::Color) -> io::Result<bool> {
+    fn fg(&mut self, color: color::Color) -> CargoResult<bool> {
         let colored = self.colored();
 
         match self.terminal {
-            Colored(ref mut c) if colored => c.fg(color),
-            _ => Ok(false)
+            Colored(ref mut c) if colored => try!(c.fg(color)),
+            _ => return Ok(false),
         }
+        Ok(true)
     }
 
-    fn attr(&mut self, attr: Attr) -> io::Result<bool> {
+    fn attr(&mut self, attr: Attr) -> CargoResult<bool> {
         let colored = self.colored();
 
         match self.terminal {
-            Colored(ref mut c) if colored => c.attr(attr),
-            _ => Ok(false)
+            Colored(ref mut c) if colored => try!(c.attr(attr)),
+            _ => return Ok(false)
         }
+        Ok(true)
     }
 
     fn supports_attr(&self, attr: Attr) -> bool {
@@ -220,13 +222,14 @@ impl Shell {
         }
     }
 
-    fn reset(&mut self) -> io::Result<()> {
+    fn reset(&mut self) -> term::Result<()> {
         let colored = self.colored();
 
         match self.terminal {
-            Colored(ref mut c) if colored => c.reset().map(|_| ()),
-            _ => Ok(())
+            Colored(ref mut c) if colored => try!(c.reset()),
+            _ => ()
         }
+        Ok(())
     }
 
     fn colored(&self) -> bool {
index 06897c2a77d1ab0aaa8ebfac7326add9ce0dbcf0..7a2ad7ab56159678306dd7e4df814d1d3de19c3d 100644 (file)
@@ -2,7 +2,7 @@ use std::io::prelude::*;
 use std::fs::{self, File};
 use std::path::{self, Path, PathBuf};
 
-use tar::Archive;
+use tar::{Archive, Builder};
 use flate2::{GzBuilder, Compression};
 use flate2::read::GzDecoder;
 
@@ -119,7 +119,7 @@ fn tar(pkg: &Package,
                                   .write(tmpfile, Compression::Best);
 
     // Put all package files into a compressed archive
-    let ar = Archive::new(encoder);
+    let mut ar = Builder::new(encoder);
     let root = pkg.root();
     for file in try!(src.list_files(pkg)).iter() {
         if &**file == dst { continue }
@@ -139,7 +139,8 @@ fn tar(pkg: &Package,
             internal(format!("could not archive source file `{}`", relative))
         }));
     }
-    try!(ar.finish());
+    let encoder = try!(ar.into_inner());
+    try!(encoder.finish());
     Ok(())
 }
 
index fbe1630d10b167558dff3a46c99c9b4e69847fcb..94499a9bafa9723e98e68aa7cec8eaf49c5ed69d 100644 (file)
@@ -5,11 +5,11 @@ use std::io;
 use std::process::{Output, ExitStatus};
 use std::str;
 
-use semver;
-use rustc_serialize::json;
-
 use curl;
 use git2;
+use rustc_serialize::json;
+use semver;
+use term;
 use toml;
 use url;
 
@@ -308,6 +308,7 @@ from_error! {
     url::ParseError,
     toml::DecodeError,
     ffi::NulError,
+    term::Error,
 }
 
 impl<E: CargoError> From<Human<E>> for Box<CargoError> {
@@ -327,6 +328,7 @@ impl CargoError for toml::Error {}
 impl CargoError for toml::DecodeError {}
 impl CargoError for url::ParseError {}
 impl CargoError for ffi::NulError {}
+impl CargoError for term::Error {}
 
 // =============================================================================
 // Construction helpers
index 2d4910edfbd4e76794c3b692c9bcef0debe137dd..63f0532453f0d537fc67fb98c82b9e025d260ab6 100644 (file)
@@ -6,7 +6,7 @@ use flate2::Compression::Default;
 use flate2::write::GzEncoder;
 use git2;
 use rustc_serialize::hex::ToHex;
-use tar::{Archive, Header};
+use tar::{Builder, Header};
 use url::Url;
 
 use support::paths;
@@ -155,25 +155,24 @@ impl Package {
         let dst = self.archive_dst();
         fs::create_dir_all(dst.parent().unwrap()).unwrap();
         let f = File::create(&dst).unwrap();
-        let a = Archive::new(GzEncoder::new(f, Default));
-        self.append(&a, "Cargo.toml", &manifest);
+        let mut a = Builder::new(GzEncoder::new(f, Default));
+        self.append(&mut a, "Cargo.toml", &manifest);
         if self.files.is_empty() {
-            self.append(&a, "src/lib.rs", "");
+            self.append(&mut a, "src/lib.rs", "");
         } else {
             for &(ref name, ref contents) in self.files.iter() {
-                self.append(&a, name, contents);
+                self.append(&mut a, name, contents);
             }
         }
-        a.finish().unwrap();
     }
 
-    fn append<W: Write>(&self, ar: &Archive<W>, file: &str, contents: &str) {
-        let mut header = Header::new();
+    fn append<W: Write>(&self, ar: &mut Builder<W>, file: &str, contents: &str) {
+        let mut header = Header::new_ustar();
         header.set_size(contents.len() as u64);
         header.set_path(format!("{}-{}/{}", self.name, self.vers, file)).unwrap();
         header.set_cksum();
 
-        ar.append(&header, &mut contents.as_bytes()).unwrap();
+        ar.append(&header, contents.as_bytes()).unwrap();
     }
 
     pub fn archive_dst(&self) -> PathBuf {
index 288c44d86bd958b7ee19a6371bc44b811d3ceeb4..2460a7b278f78f496e1f11923aff59fb01f410d8 100644 (file)
@@ -1,7 +1,6 @@
 use std::env;
 use std::fs::{self, File};
 use std::io::prelude::*;
-use std::thread;
 use tempdir::TempDir;
 
 use support::{project, execs, main_file, basic_bin_manifest};
@@ -1648,7 +1647,7 @@ test!(compile_then_delete {
     assert_that(&p.bin("foo"), existing_file());
     if cfg!(windows) {
         // On windows unlinking immediately after running often fails, so sleep
-        thread::sleep_ms(100);
+        ::sleep_ms(100);
     }
     fs::remove_file(&p.bin("foo")).unwrap();
     assert_that(p.cargo("run"),
index 8c7357436ff23243e9d51f47dc7887a2e0bc5ab8..4778135ddbf3ac7efca2d25c2c35551a67d85013 100644 (file)
@@ -1,6 +1,5 @@
 use std::fs::{self, File};
 use std::io::prelude::*;
-use std::thread;
 
 use support::{project, execs};
 use support::{COMPILING, RUNNING, DOCTEST, FRESH, DOCUMENTING};
@@ -1739,7 +1738,7 @@ test!(rebuild_only_on_explicit_paths {
 {running} `rustc src[..]lib.rs [..]`
 ", running = RUNNING, compiling = COMPILING)));
 
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
     File::create(p.root().join("foo")).unwrap();
     File::create(p.root().join("bar")).unwrap();
 
@@ -1758,7 +1757,7 @@ test!(rebuild_only_on_explicit_paths {
 {fresh} a v0.5.0 ([..])
 ", fresh = FRESH)));
 
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
 
     // random other files do not affect freshness
     println!("run baz");
index fe8cab18280920b2b503919f4b7934da004319f9..57c3c16ca0022a2c64b74cb5774144451da8f3fd 100644 (file)
@@ -1,7 +1,6 @@
 use std::fs::{self, File};
 use std::io::prelude::*;
 use std::path::Path;
-use std::thread;
 use git2;
 
 use support::{git, project, execs, main_file, path2url};
@@ -638,7 +637,7 @@ test!(update_with_shared_deps {
     git::add(&repo);
     git::commit(&repo);
 
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
 
     // By default, not transitive updates
     println!("dep1 update");
@@ -848,7 +847,7 @@ test!(stale_cached_version {
     git::add(&repo);
     git::commit(&repo);
 
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
 
     let rev = repo.revparse_single("HEAD").unwrap().id();
 
@@ -955,7 +954,7 @@ test!(dep_with_changed_submodule {
     git::add(&repo);
     git::commit(&repo);
 
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
     // Update the dependency and carry on!
     println!("update");
     assert_that(project.cargo("update").arg("-v"),
@@ -1056,7 +1055,7 @@ test!(git_build_cmd_freshness {
     }).unwrap();
     foo.root().move_into_the_past().unwrap();
 
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
 
     assert_that(foo.cargo("build"),
                 execs().with_status(0)
index 319ec6e0c447ba627033b4eda80c321bfea72b54..a3e40acbeda3d74c903baae8d30f72efe59bbb2c 100644 (file)
@@ -1,6 +1,5 @@
 use std::fs::{self, File};
 use std::io::prelude::*;
-use std::thread;
 
 use support::{project, execs, main_file};
 use support::{COMPILING, RUNNING};
@@ -351,7 +350,7 @@ test!(deep_dependencies_trigger_rebuild {
     //
     // We base recompilation off mtime, so sleep for at least a second to ensure
     // that this write will change the mtime.
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
     File::create(&p.root().join("baz/src/baz.rs")).unwrap().write_all(br#"
         pub fn baz() { println!("hello!"); }
     "#).unwrap();
@@ -364,7 +363,7 @@ test!(deep_dependencies_trigger_rebuild {
                                             COMPILING, p.url())));
 
     // Make sure an update to bar doesn't trigger baz
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
     File::create(&p.root().join("bar/src/bar.rs")).unwrap().write_all(br#"
         extern crate baz;
         pub fn bar() { println!("hello!"); baz::baz(); }
index b6801be1142453ffd6b82c725cc2f45acd00bd0f..152190cf045ca5a1e2a2427a82ee100faba6e09f 100644 (file)
@@ -1,6 +1,5 @@
 use std::fs::{self, File};
 use std::io::prelude::*;
-use std::thread;
 
 use support::{project, execs, path2url};
 use support::COMPILING;
@@ -67,7 +66,7 @@ test!(modify_only_some_files {
 ", compiling = COMPILING, dir = path2url(p.root()))));
     assert_that(p.cargo("test"),
                 execs().with_status(0));
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
 
     assert_that(&p.bin("foo"), existing_file());
 
index f7ad7d150e9a33fba6f990bbc97f8abb0b87a62b..2cea29350d3d15db20ffe0ffd56e86c3be130558 100644 (file)
@@ -1,5 +1,4 @@
 use std::fs::File;
-use std::io::Cursor;
 use std::io::prelude::*;
 use std::path::Path;
 
@@ -8,8 +7,7 @@ use git2;
 use tar::Archive;
 
 use support::{project, execs, paths, git, path2url};
-use support::{PACKAGING, VERIFYING, COMPILING, ARCHIVING, UPDATING, DOWNLOADING};
-use support::registry::{self, Package};
+use support::{PACKAGING, VERIFYING, COMPILING, ARCHIVING};
 use hamcrest::{assert_that, existing_file};
 
 fn setup() {
@@ -54,8 +52,8 @@ src[..]main.rs
     let mut rdr = GzDecoder::new(f).unwrap();
     let mut contents = Vec::new();
     rdr.read_to_end(&mut contents).unwrap();
-    let ar = Archive::new(Cursor::new(contents));
-    for f in ar.files().unwrap() {
+    let mut ar = Archive::new(&contents[..]);
+    for f in ar.entries().unwrap() {
         let f = f.unwrap();
         let fname = f.header().path_bytes();
         let fname = &*fname;
@@ -387,8 +385,8 @@ src[..]main.rs
     let mut rdr = GzDecoder::new(f).unwrap();
     let mut contents = Vec::new();
     rdr.read_to_end(&mut contents).unwrap();
-    let ar = Archive::new(Cursor::new(contents));
-    for f in ar.files().unwrap() {
+    let mut ar = Archive::new(&contents[..]);
+    for f in ar.entries().unwrap() {
         let f = f.unwrap();
         let fname = f.header().path_bytes();
         let fname = &*fname;
index 5e35c482a70a8d87d0218fde56a1efeb1528778f..a30a63f8dd0156e11f4d13e0ad427078e01c7a6c 100644 (file)
@@ -1,6 +1,6 @@
 use std::io::prelude::*;
 use std::fs::{self, File};
-use std::io::{Cursor, SeekFrom};
+use std::io::SeekFrom;
 use std::path::PathBuf;
 
 use flate2::read::GzDecoder;
@@ -76,9 +76,8 @@ test!(simple {
     assert_eq!(rdr.header().filename().unwrap(), "foo-0.0.1.crate".as_bytes());
     let mut contents = Vec::new();
     rdr.read_to_end(&mut contents).unwrap();
-    let inner = Cursor::new(contents);
-    let ar = Archive::new(inner);
-    for file in ar.files().unwrap() {
+    let mut ar = Archive::new(&contents[..]);
+    for file in ar.entries().unwrap() {
         let file = file.unwrap();
         let fname = file.header().path_bytes();
         let fname = &*fname;
index 94213c3a169935f8311bda7a43aa1e5fc4aa38f0..5238faacaf14f6e7df02a4f7811e97f26c77ecdf 100644 (file)
@@ -1,7 +1,6 @@
 use std::fs::File;
 use std::io::prelude::*;
 use std::str;
-use std::thread;
 
 use support::{project, execs, basic_bin_manifest, basic_lib_manifest};
 use support::{COMPILING, RUNNING, DOCTEST};
@@ -2009,7 +2008,7 @@ test!(bin_does_not_rebuild_tests {
     assert_that(p.cargo("test").arg("-v"),
                 execs().with_status(0));
 
-    thread::sleep_ms(1000);
+    ::sleep_ms(1000);
     File::create(&p.root().join("src/main.rs")).unwrap()
          .write_all(b"fn main() { 3; }").unwrap();
 
index 8d74c3aa2c3cc9d6ba8a212b65ebfef47689789a..931c7b818ee202ce031497eb64ee480ff9ea26c2 100644 (file)
@@ -6,6 +6,7 @@ use hamcrest::{assert_that};
 
 use cargo::core::shell::{Shell, ShellConfig};
 use cargo::core::shell::ColorConfig::{Auto,Always, Never};
+use cargo::util::CargoResult;
 
 use support::{Tap, execs, shell_writes};
 
@@ -84,7 +85,7 @@ test!(no_term {
                 execs().with_stderr(""));
 });
 
-fn colored_output(string: &str, color: color::Color) -> io::Result<String> {
+fn colored_output(string: &str, color: color::Color) -> CargoResult<String> {
     let mut term = TerminfoTerminal::new(Vec::new()).unwrap();
     try!(term.reset());
     try!(term.fg(color));
index 761fee61bb027bec60817a7165ed7c504b085761..d0fd5d58b8b1e6fb49cd55bbc72a4fb46241b49e 100644 (file)
@@ -96,3 +96,8 @@ fn process<T: AsRef<OsStr>>(t: T) -> cargo::util::ProcessBuilder {
 fn cargo_process() -> cargo::util::ProcessBuilder {
     process(&support::cargo_dir().join("cargo"))
 }
+
+#[allow(deprecated)] // sleep_ms is now deprecated in favor of sleep()
+fn sleep_ms(ms: u32) {
+    std::thread::sleep_ms(ms);
+}